import axios from '@/api/index'

// 这个接口没用到，暂时注释
// export function downloadFile(fileName: String) {
//   return axios({
//     url: '/api/admin/download',
//     method: 'get',
//     responseType: 'blob',
//     params: { fileName },
//     headers: { "no_need_to_transfer_to_the_backend": "downloadFile" },
//   })
// }

export function uploadFile(data: any, token: any = '') {
  return axios({
    url: '/api/admin/upload',
    method: 'post',
    headers: {
      "Content-Type": "multipart/form-data",
      Authorization: token,
    },
    data
  })
}